const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CompressionWebpackPlugin = require('compression-webpack-plugin');
module.exports = {
    optimization: {
        minimize: true,
    },
    plugins: [
        new CleanWebpackPlugin(),
        new CompressionWebpackPlugin({
            filename: '[file].gz',
            algorithm: 'gzip',
            test: new RegExp('\\.(' + ['js', 'css'].join('|') + ')$'),
            threshold: 10240,
            minRatio: 0.8
        })
    ],
};
